//引入依赖的配置文件模块
require(["config"],function(){
    require(["jquery","header","carousel"],function($){
        function Index(){
            this.loadCarousel();
            this.search();
        }
        $.extend(Index.prototype,{
            //加载轮播图
            loadCarousel:function(){
                $(".lunbo").carousel({
                    imgs:[
                    {href:"/html/list.html",src:"/img/153629848538.png"},
                    {href:"/html/list.html",src:"/img/152542345711.png"},
                    {href:"/html/list.html",src:"/img/153671857690.jpg"},
                    
                    ],
                    height: 625,
                    width:1000,
                    duration:2000
                });
            },
            search:function(){
             $(window).scroll(function() {
                var _top = document.documentElement.scrollTop || document.body.scrollTop;
                // 判断是否到达 1000 px位置
                if(_top >=65){
               $(".search").css('display','block');
               $(".top").css('display','block');
            } else {
                $(".search").css('display','none');
                $(".top").css('display','none');
            }
              });
           
            }


            
        });
        new Index();
    });
});
